package org.gwt.grin.rebind.commands;

import org.gwt.grin.client.commands.ActivatePartCommand;
import org.gwt.grin.rebind.SECommand;
import org.gwt.grin.rebind.SEFeature;
import org.gwt.grin.rebind.ShowBuilder;
import org.gwt.grin.rebind.features.SEAssembly;

import com.google.gwt.uibinder.rebind.IndentedWriter;

public class SEActivatePartCommand extends SECommand {

	private SEAssembly assembly;
	private SEFeature feature;

	public void setup(SEAssembly a, SEFeature f) {
		this.assembly = a;
		this.feature = f;
	}

	@Override
	protected String getClassName() {
		return ActivatePartCommand.class.getName();
	}

	@Override
	public void setup(IndentedWriter w, ShowBuilder builder) {
		String vn = getVN(builder);
		w.write("%s.setup(%s, %s);", vn, assembly.getVN(builder),
				feature.getVN(builder));
	}

}
